package me.zhengjie.modules.system.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.zhengjie.aop.log.Log;
import me.zhengjie.modules.system.service.dto.DeptDTO;
import me.zhengjie.modules.system.service.dto.DeptQueryCriteria;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zxw
 * @date 2019-11-20
 */
@RestController
@Api(tags = "系统：zxw管理")
@RequestMapping("/zxw")
public class AssemblyController {

    @Log("查询zxw数据")
    @ApiOperation("查询zxw数据")
    @PostMapping
   // @PreAuthorize("@el.check('user:list','dept:list')")
    public ResponseEntity getZxw(){
        // 数据权限
        List<String> list = new ArrayList<>();
        list.add("test");
//        criteria.setIds(dataScope.getDeptIds());
//        List<DeptDTO> deptDTOS = deptService.queryAll(criteria);
        return new ResponseEntity<>(list, HttpStatus.OK);
    }
}
